﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Linq.Expressions;

namespace IRC.IRepairClouds.DataLayer.Expressions
{
    public sealed class BinaryExpressionBuilder<T> : ExpressionBuilder<T>
    {
        public BinaryExpression SpecificExpression
        {
            get { return (BinaryExpression)Expression; }
        }

        internal BinaryExpressionBuilder(BinaryExpression expression)
            : base(expression)
        {
        }

        public static implicit operator BinaryExpression(BinaryExpressionBuilder<T> expressionBuilder)
        {
            return expressionBuilder.SpecificExpression;
        }

        public static implicit operator BinaryExpressionBuilder<T>(BinaryExpression expression)
        {
            return new BinaryExpressionBuilder<T>(expression);
        }
    }
}
